package com.xingchen.loveparttimejob.model.pojo;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024-12-03
 * @vesion 1.0.0
 */
public class JobInfo {
    /**
     * 基本信息编号
     */
    private int jiId;
    /**
     * 职位类型编号（外键）
     */
    private int pttId;
    /**
     * 职位标题
     */
    private String jiTitle;
    /**
     * 职位描述
     */
    private String jiDescribe;
    /**
     * 薪资范围最低值
     */
    private String salaryMin;
    /**
     * 薪资范围最高值
     */
    private String salaryMax;
    /**
     * 薪资类型
     */
    private String salaryType;
    /**
     * 工作地点
     */
    private String jobAddress;
    /**
     * 工作环境图片
     */
    private String jobEnvironment;
    /**
     * 职位已招人数
     */
    private int jiRecruitedPeopleNumber;
    /**
     * 职位在招人数
     */
    private int jiRecruitingPeopleNumber;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 是否删除
     */
    private int state;

    // 构造方法
    public JobInfo() {}
    public JobInfo(int jiId, int pttId, String jiTitle, String jiDescribe, String salaryMin, String salaryMax, String salaryType, String jobAddress, String jobEnvironment, int jiRecruitedPeopleNumber, int jiRecruitingPeopleNumber, Date createTime, int state) {
        this.jiId = jiId;
        this.pttId = pttId;
        this.jiTitle = jiTitle;
        this.jiDescribe = jiDescribe;
        this.salaryMin = salaryMin;
        this.salaryMax = salaryMax;
        this.salaryType = salaryType;
        this.jobAddress = jobAddress;
        this.jobEnvironment = jobEnvironment;
        this.jiRecruitedPeopleNumber = jiRecruitedPeopleNumber;
        this.jiRecruitingPeopleNumber = jiRecruitingPeopleNumber;
        this.createTime = createTime;
        this.state = state;
    }

    /**
     * 反射中使用到
     * @return
     */
    public Map<String,String> getMapping(){
        Map<String,String> map = new HashMap<>();
        map.put("jiId","ji_id");
        map.put("pttId","ptt_id");
        map.put("jiTitle","ji_title");
        map.put("jiDescribe","ji_describe");
        map.put("salaryMin","salary_min");
        map.put("salaryMax","salary_max");
        map.put("salaryType","salary_type");
        map.put("jobAddress","job_address");
        map.put("jobEnvironment","job_environment");
        map.put("jiRecruitedPeopleNumber","ji_recruited_people_number");
        map.put("jiRecruitingPeopleNumber","ji_recruiting_people_number");
        map.put("createTime","create_time");
        map.put("state","state");
        return map;
    }

    // 属性
    public int getJiId() {
        return jiId;
    }

    public void setJiId(int jiId) {
        this.jiId = jiId;
    }

    public int getPttId() {
        return pttId;
    }

    public void setPttId(int pttId) {
        this.pttId = pttId;
    }

    public String getJiTitle() {
        return jiTitle;
    }

    public void setJiTitle(String jiTitle) {
        this.jiTitle = jiTitle;
    }

    public String getJiDescribe() {
        return jiDescribe;
    }

    public void setJiDescribe(String jiDescribe) {
        this.jiDescribe = jiDescribe;
    }

    public String getSalaryMin() {
        return salaryMin;
    }

    public void setSalaryMin(String salaryMin) {
        this.salaryMin = salaryMin;
    }

    public String getSalaryMax() {
        return salaryMax;
    }

    public void setSalaryMax(String salaryMax) {
        this.salaryMax = salaryMax;
    }

    public String getSalaryType() {
        return salaryType;
    }

    public void setSalaryType(String salaryType) {
        this.salaryType = salaryType;
    }

    public String getJobAddress() {
        return jobAddress;
    }

    public void setJobAddress(String jobAddress) {
        this.jobAddress = jobAddress;
    }

    public String getJobEnvironment() {
        return jobEnvironment;
    }

    public void setJobEnvironment(String jobEnvironment) {
        this.jobEnvironment = jobEnvironment;
    }

    public int getJiRecruitedPeopleNumber() {
        return jiRecruitedPeopleNumber;
    }

    public void setJiRecruitedPeopleNumber(int jiRecruitedPeopleNumber) {
        this.jiRecruitedPeopleNumber = jiRecruitedPeopleNumber;
    }

    public int getJiRecruitingPeopleNumber() {
        return jiRecruitingPeopleNumber;
    }

    public void setJiRecruitingPeopleNumber(int jiRecruitingPeopleNumber) {
        this.jiRecruitingPeopleNumber = jiRecruitingPeopleNumber;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    /**
     * 打印基本工作信息表
     * @return
     */
    @Override
    public String toString() {
        return "JobInfo{" +
                "jiId=" + jiId +
                ", pttId=" + pttId +
                ", jiTitle='" + jiTitle + '\'' +
                ", jiDescribe='" + jiDescribe + '\'' +
                ", salaryMin='" + salaryMin + '\'' +
                ", salaryMax='" + salaryMax + '\'' +
                ", salaryType='" + salaryType + '\'' +
                ", jobAddress='" + jobAddress + '\'' +
                ", jobEnvironment='" + jobEnvironment + '\'' +
                ", jiRecruitedPeopleNumber=" + jiRecruitedPeopleNumber +
                ", jiRecruitingPeopleNumber=" + jiRecruitingPeopleNumber +
                ", createTime=" + createTime +
                ", state=" + state +
                '}';
    }
}
